package edu.gatech.cs2340.teamrocket.model.map;

import edu.gatech.cs2340.teamrocket.model.storage.ShopInventory;
import edu.gatech.cs2340.teamrocket.model.storage.ShopInventoryFactory;

/**
 *  Town Location. 50% chance of having a ShopInventory.
 *
 * @author Joe Tacheron
 */
public class Town extends Location {

    private static final double HAS_SHOP_PROB = 1;

    public Town(String name, int endDist){
        super(name, endDist);
        if(Math.random() < HAS_SHOP_PROB)
            shop = ShopInventoryFactory.getRandomShopInventory();
    }

    protected Town(String name, ShopInventory si, int endDist){
        super(name, si, endDist);
    }
}